package cn.tedu.spring.life;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestDBConnect {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("cn.tedu.spring.life");
        DBConnect dbConnect = context.getBean(DBConnect.class);
        System.out.println("4:开发者使用阶段;");
        //手动关闭IoC容器,会销毁所有的Bean
        context.close();
    }
}
